﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Upreader.Usenet.Nntp.Encodings
{
    /// <summary>
    /// Provides functionality for detecting and decoding streams
    /// </summary>
    public interface IStreamDecoder
    {
        /// <summary>
        /// Determines whether it can decode the stream given and returns a decoder factory if so
        /// This method should return as soon as it finds it can or cant decode the stream given
        /// </summary>
        /// <param name="stream">The original stream to try and decode</param>
        /// <returns>True if the stream given can be decoded</returns>
        bool TryCreateDecodeStreamFactory(Stream stream, out Func<Stream, Stream> decodeStreamFactory);
    }
}
